package com.ruoyi.sys.security.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.sys.security.mapper.TbPatrollingPlanMapper;
import com.ruoyi.sys.security.domain.TbPatrollingPlan;
import com.ruoyi.sys.security.service.ITbPatrollingPlanService;

/**
 * 巡更计划Service业务层处理
 * 
 * @author iuxin
 * @date 2022-05-25
 */
@Service
public class TbPatrollingPlanServiceImpl implements ITbPatrollingPlanService 
{
    @Autowired
    private TbPatrollingPlanMapper tbPatrollingPlanMapper;

    /**
     * 查询巡更计划
     * 
     * @param ppId 巡更计划主键
     * @return 巡更计划
     */
    @Override
    public TbPatrollingPlan selectTbPatrollingPlanByPpId(Long ppId)
    {
        return tbPatrollingPlanMapper.selectTbPatrollingPlanByPpId(ppId);
    }

    /**
     * 查询巡更计划列表
     * 
     * @param tbPatrollingPlan 巡更计划
     * @return 巡更计划
     */
    @Override
    public List<TbPatrollingPlan> selectTbPatrollingPlanList(TbPatrollingPlan tbPatrollingPlan)
    {
        return tbPatrollingPlanMapper.selectTbPatrollingPlanList(tbPatrollingPlan);
    }

    /**
     * 新增巡更计划
     * 
     * @param tbPatrollingPlan 巡更计划
     * @return 结果
     */
    @Override
    public int insertTbPatrollingPlan(TbPatrollingPlan tbPatrollingPlan)
    {
        return tbPatrollingPlanMapper.insertTbPatrollingPlan(tbPatrollingPlan);
    }

    /**
     * 修改巡更计划
     * 
     * @param tbPatrollingPlan 巡更计划
     * @return 结果
     */
    @Override
    public int updateTbPatrollingPlan(TbPatrollingPlan tbPatrollingPlan)
    {
        return tbPatrollingPlanMapper.updateTbPatrollingPlan(tbPatrollingPlan);
    }

    /**
     * 批量删除巡更计划
     * 
     * @param ppIds 需要删除的巡更计划主键
     * @return 结果
     */
    @Override
    public int deleteTbPatrollingPlanByPpIds(Long[] ppIds)
    {
        return tbPatrollingPlanMapper.deleteTbPatrollingPlanByPpIds(ppIds);
    }

    /**
     * 删除巡更计划信息
     * 
     * @param ppId 巡更计划主键
     * @return 结果
     */
    @Override
    public int deleteTbPatrollingPlanByPpId(Long ppId)
    {
        return tbPatrollingPlanMapper.deleteTbPatrollingPlanByPpId(ppId);
    }
}
